<template>




  <b-col cols="4" class="text-center item" @click="goto" v-b-popover.hover.top="popup">
    <b-img :src="src" height="50px" width="50px" class="my-3">

    </b-img>
    <p class="mb-1">
      {{title}}
      <b-badge :variant="variant" class="ml-1" v-if="count"
      >{{count}}</b-badge>
    </p>
  </b-col>
</template>

<script>
  export default {
    name: "SpcaeItem",
    props:['src','title','count','to','variant','popup'],
    data(){
      return {

      }
    },
    methods:{
      goto(){
        if (this.to === ''){
          this.$emit('click')
        }else{
          this.$router.push(this.to)
        }

      }
    }
  }
</script>

<style scoped>

</style>